<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h1 class="h1">标题一 姓名: {{name}} </h1>
    <h2 style="color: red;">标题二 年龄: {{age}}</h2>
    <div>
      <h3 class="h2">标题三</h3>
      <span style="color: pink;font-size: 30px;">姓名: {{name}} ，年龄: {{age}}</span>
    </div>
  </div>

  <script src="../dist/vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        name: '小明',
        age: 18
      },
      created() {
        console.log("created")
      }
    });

    setInterval(() => {
      vm.age++

      vm.$nextTick(() => {
        console.log(app.innerHTML)
      })
    }, 2000)
  </script>
</body>
</html>